<template>
  <div class="home">
    <!-- <div class="title">

    </div> -->
    <div class="img-content">
      <img :src="setImg(ImgData)" alt="">
    </div>

    <!-- loading -->
    <van-overlay :show="showLoading">
      <div class="loading-content">
        <van-loading />
      </div>
    </van-overlay>
    <!-- loading end -->
  </div>
</template>

<script>

import { getList} from '../../api/index'
export default {
  data() {
    return {
      giftId: '',
      ImgData: '',
      showLoading: false
    }
  },
  created() {
    this.giftId = this.$route.query.id
    this.getList()
  },
  mounted() {

  },
  methods: {
    getList() {
      this.showLoading = true
      getList({giftId: this.giftId}).then(res => {
        console.log(res)
        this.showLoading = false
        if(res.errorCode == 0){
          if(res.data.banner && res.data.banner.bannerContentImg){
            this.ImgData = res.data.banner.bannerContentImg
            console.log(this.ImgData,'jjjjj')
          } else {
            this.ImgData = ''
          }
          
        }
      })
    },
    setImg(val){
      if(val){
        return 'https://img.play-chat.net/' + val;
       }
    }
  }
}
</script>

<style scoped lang="scss">
@import './index.scss';
</style>
